package at.fhooe.engine.event.events;

import at.fhooe.engine.event.EventListener;
import at.fhooe.engine.input.ControlType;

public class ControlChangedEvent extends Event {

	public static final String TYPE = "ControlChangedEvent";
	private final ControlType	m_type;

	public ControlChangedEvent(ControlType type) {
		super(TYPE);
		m_type = type;
	}

	public ControlType getControlType() {
		return m_type;
	}

	//embedded listener interface with the specific function call
	public interface Listener extends EventListener {
		public void onControlChangedEvent(
				ControlChangedEvent controlChangedEvent);
	}

	@Override
	public void processEvent(EventListener eventListener) {
		((Listener) eventListener).onControlChangedEvent(this);
	}
}
